<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link href="css/icons-extra.css" rel="stylesheet" />
		<link href="css/iconfont.css" rel="stylesheet" type="text/css" />
	</head>
	<body>


		<nav class="mui-bar mui-bar-tab">
			<a class="mui-tab-item mui-active" href="./OtherPages/index.html">
				<span class="mui-icon mui-icon-home" style="font-size: 23px;"></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a class="mui-tab-item" href="./OtherPages/licai.html">
				<span class="mui-icon iconfont icon-licai" style="font-size: 18px;"></span>
				<span class="mui-tab-label">理财</span>
			</a>
			<a class="mui-tab-item" href="./OtherPages/jiekuan.html">
				<span class="mui-icon iconfont icon-jiekuan" style="font-size: 28px;"></span>
				<span class="mui-tab-label">贷款</span>
			</a>
			<a class="mui-tab-item" href="./OtherPages/jiaoquan.html">
				<span class="mui-icon iconfont icon-qunzu" style="font-size: 25px;"></span>
				<span class="mui-tab-label">交圈</span>
			</a>
			<a class="mui-tab-item" href="./OtherPages/wode.html">
				<span class="mui-icon mui-icon-contact" style="font-size: 28px;"></span>
				<span class="mui-tab-label">我的</span>
			</a>
		</nav>
		<script type="text/javascript">
			mui.init();
				mui.plusReady(function () {
			    //定义一个容器，用于存储底部选项卡所关联的页面
				var pages = ["./OtherPages/index.html","./OtherPages/licai.html","./OtherPages/jiekuan.html","./OtherPages/jiaoquan.html","./OtherPages/wode.html"];
				//获取当前窗口对象
				var ws = plus.webview.currentWebview();
				//设置页面窗口样式
				var pageStyle = {
					top:"0px",
					bottom:"50px"
				};
				//循环数组，为每个页面创建webview窗口对象
				for(var i = 0;i<pages.length;i++){
					//将每次循环提取的页面创建为webview窗口对象
					var item = plus.webview.create(pages[i],pages[i],pageStyle);
					item.hide();
					//将每个webview窗口对象追加至当前ws对象中
					ws.append(item);
				}
				//设置默认打开窗口 
				plus.webview.show(pages[0]);
				//选项卡事件监听
				mui(".mui-bar-tab").on("tap","a",function(){
					//获取被点击a标签的href属性值
					var href = this.getAttribute("href");
					//展示对应的页面
					plus.webview.show(href,"fade-in",100);
				});
			});
		</script>
	</body>
</html>
